package com.csun.cmny.provider.service.impl;

import com.csun.cmny.core.support.BaseService;
import com.csun.cmny.provider.dao.OmcInventoryMapper;
import com.csun.cmny.provider.model.domain.OmcInventory;
import com.csun.cmny.provider.model.dto.inventory.InStockQueryDto;
import com.csun.cmny.provider.model.dto.inventory.InventoryQueryDto;
import com.csun.cmny.provider.model.vo.inventory.InStockVo;
import com.csun.cmny.provider.model.vo.inventory.InventoryVo;
import com.csun.cmny.provider.service.OmcInventoryService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Slf4j
@Service
@Transactional
public class OmcInventoryServiceImpl extends BaseService<OmcInventory> implements OmcInventoryService {

    @Resource
    private OmcInventoryMapper omcInventoryMapper;
    @Override
    public List<InStockVo> selectInstock(InStockQueryDto inStockQueryDto) {
        return omcInventoryMapper.selectInstock(inStockQueryDto);
    }

    @Override
    public List<InStockVo> selectOutstock(InStockQueryDto inStockQueryDto) {
        return omcInventoryMapper.selectOutstock(inStockQueryDto);
    }

    @Override
    public List<InventoryVo> selectInventory(InventoryQueryDto inventoryQueryDto) {
        return omcInventoryMapper.selectInventory(inventoryQueryDto);
    }
}
